import { PrimaryColumn , Column, Entity , OneToMany } from 'typeorm';
import { TodoDetail } from './todo_detail';

@Entity()
class StatusEnum {

    @PrimaryColumn()
    id: number;

    @Column({
        type: "varchar",
        length: 255,
        nullable: false,
    })
    name: string;

    @Column({
        type: "varchar",
        length: 255,
        nullable: false,
    })
    value: string;

    @OneToMany(type => TodoDetail, todoDetail => todoDetail.statusEnum)
    todoDetail: TodoDetail[]
}

export { StatusEnum };